<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title></title>
	<script type="text/javascript">
		str ="NidfdegdHdrE";

		document.write(str+"<br>");

		temp = "";

		for (var i in str) {
			if(str[i].toLowerCase()==str[i]){
				temp +=str[i].toUpperCase();
			}else{
				temp +=str[i].toLowerCase();
			}
		};

		document.write(temp+"<br>");



		arr = [];

		for (var i =0; i < 6; i++) {
			num = Math.round(Math.random()*46+1);

			if(arr.indexOf(num)=='-1'){
				arr.push(num);
			}else{
				i--;
			}
			
		};

		document.write(arr+"<br>");


		now = new Date();

		yd =  new Date("2018-01-01 00:00:00");

		diff = Math.round((yd.getTime()-now.getTime())/1000);

		day = Math.floor(diff/86400);

		hours = Math.floor((diff%86400)/3600);

		min = Math.floor(((diff%86400)%3600)/60);

		sen = Math.floor(((diff%86400)%3600)%60);

		document.write(day+"天"+hours+"小时"+min+'分钟'+sen+"秒");


		
		
	






		




	</script>
</head>
<body>
	
</body>
</html>